package index;

import java.util.Random;
import java.util.Scanner;

public class oop {
    public static void main(String[] args) {
        //1.面向对象
        Scanner sc=new Scanner(System.in);
        System.out.println("输入你的性别?");
        if(!sc.next().isEmpty()&&sc.next().equals("男")||sc.next().equals("女")){
            System.out.println("gender right");
        }else {
            System.out.println("gender error or gender is not allow empty ");
        }
        //1.random
        //创建了一个随机数对象
        Random rd=new Random();
        System.out.println(rd.nextInt(10)+1);
    }
}
